package com.why.blog.controller;

import com.why.blog.bean.Blog;
import com.why.blog.service.BlogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @program: blog
 * @description:
 * @author: @why
 * @create: 2021-01-18 19:30
 **/
@RestController
public class TestController {
    @Autowired
    BlogService blog;

    @GetMapping("/test")
    public List<Blog> blogList(){

        return  blog.getBlogByName("a");

    }
}
